package com.huitone.gddw.service.dto;

import com.huitone.gddw.common.excel.ColToProperty;
import com.huitone.gddw.common.excel.TabCol;
import com.huitone.gddw.dao.entity.GateDef;

/**
 * 短信网关通道管理 DTO 对象
 * @author wuluodan
 *
 */
public class GateDefDTO {

	@ColToProperty
	@TabCol(Index = 1, title = "序号", width = "")
	private Integer seq;
	
	@ColToProperty
	@TabCol(Index = 2, title = "短信通道ID", width = "240")
	private String gateLinkId;

	@ColToProperty
	@TabCol(Index = 3, title = "短信通道名称", width = "90")
    private String gateLinkName;
    
	private String mobileCorp;
	
	@ColToProperty
	@TabCol(Index = 4, title = "归属运营商", width = "65")
    private String mobileCorpName;
    
	@ColToProperty
	@TabCol(Index = 5, title = "特服号码", width = "")
    private String spNumber;
    
	@ColToProperty
	@TabCol(Index = 6, title = "企业代码", width = "")
    private String corpId;

	@ColToProperty
	@TabCol(Index = 7, title = "并发连接数（条）", width = "105")
    private Integer linkNum;

	private String status;
	
	@ColToProperty
	@TabCol(Index = 8, title = "状态", width = "")
    private String statusStr;
	
	private String specialIp;

    private Integer specialPort;
    
    private String specialLoginUser;

    private String specialLoginPwd;
    
    private String internetIp;

    private Integer internetPort;
    
    private String internetLoginUser;

    private String internetLoginPwd;
    
    private String serverIp;

    private Integer serverPort;
    
    private String loginUser;

    private String loginPwd;
	
	@ColToProperty
	@TabCol(Index = 9, title = "说明", width = "150")
	private String desc;
	
	private String signType;
	
	private String srvType;

    private Integer maxFlow;

    public GateDefDTO() {}
    
    public GateDefDTO(GateDef entity) {
    	this.setGateLinkId(entity.getGateLinkId());
    	this.setGateLinkName(entity.getGateLinkName());
    	this.setMobileCorp(entity.getMobileCorp());
    	this.setSpNumber(entity.getSpNumber());
    	this.setCorpId(entity.getCorpId());
    	this.setLinkNum(entity.getLinkNum());
    	this.setStatus(entity.getStatus());
    	this.setSpecialIp(entity.getSpecialIp());
    	this.setSpecialPort(entity.getSpecialPort());
    	this.setSpecialLoginUser(entity.getSpecialLoginUser());
    	this.setSpecialLoginPwd(entity.getSpecialLoginPwd());
    	this.setInternetIp(entity.getInternetIp());
    	this.setInternetPort(entity.getInternetPort());
    	this.setInternetLoginUser(entity.getInternetLoginUser());
    	this.setInternetLoginPwd(entity.getInternetLoginPwd());
    	this.setServerIp(entity.getServerIp());
    	this.setServerPort(entity.getServerPort());
    	this.setLoginUser(entity.getLoginUser());
    	this.setLoginPwd(entity.getLoginPwd());
    	this.setDesc(entity.getDesc());
    	this.setSignType(entity.getSignType());
    	this.setSrvType(entity.getSrvType());
    	this.setMaxFlow(entity.getMaxFlow());
    }
    
    public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getGateLinkId() {
        return gateLinkId;
    }

    public void setGateLinkId(String gateLinkId) {
        this.gateLinkId = gateLinkId == null ? null : gateLinkId.trim();
    }

    public String getGateLinkName() {
        return gateLinkName;
    }

    public void setGateLinkName(String gateLinkName) {
        this.gateLinkName = gateLinkName == null ? null : gateLinkName.trim();
    }

    public String getMobileCorp() {
		return mobileCorp;
	}

	public void setMobileCorp(String mobileCorp) {
		this.mobileCorp = mobileCorp;
	}

	public String getMobileCorpName() {
		return mobileCorpName;
	}

	public void setMobileCorpName(String mobileCorpName) {
		this.mobileCorpName = mobileCorpName;
	}

	public String getSpNumber() {
		return spNumber;
	}

	public void setSpNumber(String spNumber) {
		this.spNumber = spNumber;
	}

	public String getCorpId() {
		return corpId;
	}

	public void setCorpId(String corpId) {
		this.corpId = corpId;
	}

	public Integer getLinkNum() {
        return linkNum;
    }

    public void setLinkNum(Integer linkNum) {
        this.linkNum = linkNum;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

	public String getStatusStr() {
		if (null == this.status) {
			return "未知";
		}
		if (this.status.equals("1")) {
			return "有效";
		}
		if (this.status.equals("0")) {
			return "失效";
		}
		return "未知";
	}

	public void setStatusStr(String statusStr) {
		this.statusStr = statusStr;
	}
	
	public String getSpecialIp() {
        return specialIp;
    }

    public void setSpecialIp(String specialIp) {
        this.specialIp = specialIp == null ? null : specialIp.trim();
    }

    public Integer getSpecialPort() {
        return specialPort;
    }

    public void setSpecialPort(Integer specialPort) {
        this.specialPort = specialPort;
    }
    
    public String getSpecialLoginUser() {
        return specialLoginUser;
    }

    public void setSpecialLoginUser(String specialLoginUser) {
        this.specialLoginUser = specialLoginUser == null ? null : specialLoginUser.trim();
    }

    public String getSpecialLoginPwd() {
        return specialLoginPwd;
    }

    public void setSpecialLoginPwd(String specialLoginPwd) {
        this.specialLoginPwd = specialLoginPwd == null ? null : specialLoginPwd.trim();
    }
    
    public String getInternetIp() {
        return internetIp;
    }

    public void setInternetIp(String internetIp) {
        this.internetIp = internetIp == null ? null : internetIp.trim();
    }
    
    public Integer getInternetPort() {
        return internetPort;
    }

    public void setInternetPort(Integer internetPort) {
        this.internetPort = internetPort;
    }
    
    public String getInternetLoginUser() {
        return internetLoginUser;
    }

    public void setInternetLoginUser(String internetLoginUser) {
        this.internetLoginUser = internetLoginUser == null ? null : internetLoginUser.trim();
    }

    public String getInternetLoginPwd() {
        return internetLoginPwd;
    }

    public void setInternetLoginPwd(String internetLoginPwd) {
        this.internetLoginPwd = internetLoginPwd == null ? null : internetLoginPwd.trim();
    }
    
    public String getServerIp() {
        return serverIp;
    }

    public void setServerIp(String serverIp) {
        this.serverIp = serverIp == null ? null : serverIp.trim();
    }

    public Integer getServerPort() {
        return serverPort;
    }

    public void setServerPort(Integer serverPort) {
        this.serverPort = serverPort;
    }
    
    public String getLoginUser() {
        return loginUser;
    }

    public void setLoginUser(String loginUser) {
        this.loginUser = loginUser == null ? null : loginUser.trim();
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd == null ? null : loginPwd.trim();
    }

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getSignType() {
		return signType;
	}

	public void setSignType(String signType) {
		this.signType = signType;
	}

	public String getSrvType() {
		return srvType;
	}

	public void setSrvType(String srvType) {
		this.srvType = srvType;
	}

    public Integer getMaxFlow() {
        return maxFlow;
    }

    public void setMaxFlow(Integer maxFlow) {
        this.maxFlow = maxFlow;
    }
}
